package com.it.app;
import com.it.bean.Staff;
import com.it.bean.User;
import com.it.service.StaffService;
import java.util.Scanner;
public class StaffApp {

    public static void main(String[] args) {
        StaffService staffService = new StaffService();
        System.out.println("欢迎来到员工管理系统");
        Scanner sc = new Scanner(System.in);
        while (true) {
            int choose = staffService.menu();
            switch (choose) {
                case 1:
                    for (int i = 0; i < 5; i++) {
                        System.out.println("请输入员工编号："+(i+001));
                        System.out.println("请输入员工姓名："+"admin"+(i+1));
                        System.out.println("请输入员工年龄："+20*(i+1));
                        System.out.println("请输入员工工资："+5000*(i+1));
                        staffService.addStaff(staffService.equals(staffService));
                    }
                    break;
                    case 2:
                        System.out.println("查询所有员工信息");
                        staffService.findAllStaff();
      /*          case 2:
                    System.out.println("查询所有员工信息");
                    staffService.findAllStaff();
                    break;
                case 3:
                    System.out.println("查询员工信息");
                    System.out.println("请输入员工姓名：");
                    String Staffname = sc.next();
                    staffService.findStaffByName(Staffname);
                    break;
                case 4:
                    System.out.println("按照员工编号删除员工信息");
                    System.out.println("请输入员工编号：");
                    int Staffidnum = sc.nextInt();
                    staffService.delStaff(Staffidnum);
                    break;
                case 5:
                    System.out.println("随机抽一名中奖员工");
                    staffService.jpUser();
                    break;
                case 6:
                    System.out.println("查看改公司员工所有工资的总和");
                    staffService.sumSalary();
                    break;
                case 7:
                    System.out.println("查看改公司员工的平均工资");
                    staffService.avgSalary();
                    break;
                case 8:
                    System.out.println("查看该公司薪资最高员工的工资");
                    staffService.maxSalary();
                    break;
                case 9:
                    System.out.println("查看该公司薪资最低员工的工资");
                    staffService.minSalary();
                    break;
                case 10:
                    System.out.println("查看该公司薪资高于平均工资的员工信息");
                    staffService.aboveavg();
                    break;
                case 0:
                    System.out.println("退出系统");
                    System.exit(0);
                    break;
            }
        }*/
    }}}
}
